# 启动django
import os
import sys
import django

base_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
sys.path.append(base_dir)

os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'xm.settings')
django.setup()  # 伪造让django启动

from web import models
from utils.encrypt import md5

for i in range(1, 201):
    models.Customer.objects.create(
        username=f'user{i}',
        password=md5(f'user{i}'),
        mobile='13012345678',
        level_id=1,
        createdBy_id=1)
